﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using YouHP.Utility;
using System.Xml;
using System.Xml.Serialization;
using System.Text.RegularExpressions;

namespace YouHP.Labs
{
    public class Pragram
    {
        

        public static void Main()
        {
            RegexOptions options;
            if (Environment.Version.Major == 1)
            {
                options = RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline;
            }
            else
            {
                options = RegexOptions.IgnoreCase | RegexOptions.Singleline;
            }

            Regex r = new Regex(@"({([^\{\}='\s]+)})", options);

            //string content = "<a href=\"{this.GetUrl(\"/Member/Index.aspx\"))}\"></a>";
            string content = "<a href=\"{this.GetUrl(\"\")}\"></a>";


            foreach (Match m in r.Matches(content))
            {
                content = content.Replace(m.Groups[0].ToString(),
                        string.Format("\" + {0} + \"", m.Groups[2].ToString().Replace("\\\"", "\"").Trim()));
            }
        }


    }

  
}
